package com.wlz.service;

import com.github.lianjiatech.retrofit.spring.boot.annotation.Intercept;
import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import com.wlz.config.TimeStampInterceptor;
import com.wlz.domain.Person;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * @author： wlz
 * @Date 2020/7/21 9:39
 * @description： TODO
 * @version: 1.0
 */
@RetrofitClient(baseUrl = "${test.baseUrl}")
@Intercept(handler = TimeStampInterceptor.class, include = {"/api/**"}, exclude = "/api/test/savePerson")
public interface HttpApi {

    @GET("person")
    Person getPerson(@Query("id") Long id);

    @POST("savePerson")
    Person savePerson(@Body Person person);

}
